<!DOCTYPE html>
<html>
    <head>
        {% block head %}
        <link rel="stylesheet" href="{{url_for('static', filename='style.css')}}">
        <title> 
            {% block title %}
            {% endblock %} - My Webpage
        </title>
        {% with messages = get_flashed_messages(with_categories=True) %}
            {% if messages %}
                <ul class="flashes">
                    {% for category,message in messages %}
                        <li>{{category}},{{message}}</li>
                    {% endfor %}
                </ul>
            {% endif %}
        {% endwith %}

        {% with errors = get_flashed_messages(category_filter=['error']) %}
            {% if errors %}
                <div class="alert-message block-message error">
                    <a class="close" href="#">x</a>
                    <ul>
                        {%- for error in errors %}
                            <li>{{error}}</li>
                        {% endfor -%}
                    </ul>
                    
                </div>
            {% endif %}
        {% endwith %}

        {% endblock %}
    </head>
   {% block body %}{% endblock %}
</html>
